UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '60v/MItSTKxLhzpNj+0QUBrEmIJSCNi3Qj8tkEUu3e4=' 
WHERE 
  key_id = '05f1ac2fdaa7f5e9dc9be797ff103b1f0d40c3c0f7c4bd0e94f00cabf79aa3be' 
  AND (
    token = '60v/MItSTKxLhzpNj+0QUBrEmIJSCNi3Qj8tkEUu3e4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014