UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SFPwqG7fovW0A6K7EmEXSbQySLxtI5z2SGAp0VFpdeg=' 
WHERE 
  key_id = '73adb1e65aa659646547a785afeca5875d1f0e73bdee3eeac4fd75c98e6c4b14' 
  AND (
    token = 'SFPwqG7fovW0A6K7EmEXSbQySLxtI5z2SGAp0VFpdeg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046