UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SU2T1DNNwsRvlF+Mcto/2caig8hFTTElK++rUObY4vY=' 
WHERE 
  key_id = 'aa38cb73a0549d35995fdea8dc0d8431b08950061cfc4676eb2cd2606af6764f' 
  AND (
    token = 'SU2T1DNNwsRvlF+Mcto/2caig8hFTTElK++rUObY4vY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027