UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'm5fZ/GHsRAnrDxSRujGp8GXuTtZJ9AnIBWtU7o4ex7w=' 
WHERE 
  key_id = '706f9e29e8d45f5b9624490ad6f5c91bc5308d6b828f294c6edc21a446ebfc0a' 
  AND (
    token = 'm5fZ/GHsRAnrDxSRujGp8GXuTtZJ9AnIBWtU7o4ex7w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027