UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VL/NFe6b9QMpWZE9O9EikX7jB5rHjvI2wvxbSu/JMHA=' 
WHERE 
  key_id = '632eb344ba1d46a60b8df7d5f37d3de840a9da137fdc4ef9bf82e321729f413b' 
  AND (
    token = 'VL/NFe6b9QMpWZE9O9EikX7jB5rHjvI2wvxbSu/JMHA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038