UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1AS3LO3lYYE5xps2yrMKyI7/PKZAo2Rmy2ogUFKzwAI=' 
WHERE 
  key_id = '1431c23b61a2134c0dcf78dd98710c2e14bac82491a7a399e2bdf25ed2d7a594' 
  AND (
    token = '1AS3LO3lYYE5xps2yrMKyI7/PKZAo2Rmy2ogUFKzwAI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022