UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IFz2inoUqutDyLg2w5kaXy5i5/pVhWC/3lP873OYSTs=' 
WHERE 
  key_id = 'f199270404c9671c6b4b8d7c52ec510159da07b598570f7128b84dc8ac1732fe' 
  AND (
    token = 'IFz2inoUqutDyLg2w5kaXy5i5/pVhWC/3lP873OYSTs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029