UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HMfgkjFIZtDFOB1zyq+Vljj8x9akzwAA8kUvLpWb9X8=' 
WHERE 
  key_id = 'e0b8cbf8ab3b8908769a92ae16101b93b0c5c90fa58a81db96615d2431fade78' 
  AND (
    token = 'HMfgkjFIZtDFOB1zyq+Vljj8x9akzwAA8kUvLpWb9X8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031