UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZnqGYR+ea9Ep+k9500mnWzq0BQdMfsjzUE0AxQhB1Hg=' 
WHERE 
  key_id = '3a9aa8e6b72728b3ff53434a5958cce4d2c9bf120c07c5ebfdf8cc3e2f80dc1a' 
  AND (
    token = 'ZnqGYR+ea9Ep+k9500mnWzq0BQdMfsjzUE0AxQhB1Hg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033