UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FN2l/aUpBzx+bHlzGOQbzHQCsVMRfX9rimbGXCjImio=' 
WHERE 
  key_id = '9842def7e39df2f73484cde39ae1f7040eaf9a2f7caecdc6d81f6fac360d632d' 
  AND (
    token = 'FN2l/aUpBzx+bHlzGOQbzHQCsVMRfX9rimbGXCjImio=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044