UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nVjSRZNw4bimnn172JNIJaDwMiBDHDdXH9PsgW0BPt8=' 
WHERE 
  key_id = '706e3352913d93ae235c5af561ac6d740d1979845e7691013ebcba5466ea690e' 
  AND (
    token = 'nVjSRZNw4bimnn172JNIJaDwMiBDHDdXH9PsgW0BPt8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031