UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+ZyQzpm5eJxwaQj4/7HlTZzoCjSaSm57cltV5g8K09I=' 
WHERE 
  key_id = 'cabd8e36dff4bc95fc3e168cba4ddca0696461d46ef54c7c047d5a4dddac6373' 
  AND (
    token = '+ZyQzpm5eJxwaQj4/7HlTZzoCjSaSm57cltV5g8K09I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021