UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8oOtqDNA3oaN05uoPvJybyOBwSens4tRsBAFMKyq7fQ=' 
WHERE 
  key_id = 'fb3006d924fd15490282bfcd991702366757ffc66c1f6ee1ca1717214e954a8d' 
  AND (
    token = '8oOtqDNA3oaN05uoPvJybyOBwSens4tRsBAFMKyq7fQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028