UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tJW7LarKpHz5KeZtnnQu97HBKtjduVFBU55TM/MjAnA=' 
WHERE 
  key_id = '9a3fe853b95471cd4b055ba25a16cda81f13c621eabf1b979fb03b877054f491' 
  AND (
    token = 'tJW7LarKpHz5KeZtnnQu97HBKtjduVFBU55TM/MjAnA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032