UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4llRZGDLt62cYnQT661Cc9ge/b+EHCVr0fscxu7kztw=' 
WHERE 
  key_id = '959e15cadead3a67793282658c9628f75154623bc20e96fd92e203a3f52b517b' 
  AND (
    token = '4llRZGDLt62cYnQT661Cc9ge/b+EHCVr0fscxu7kztw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022