UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9KiMMGiK/jT8biQiLyZrEdY9dQhsXNWhUYMIOqItrHg=' 
WHERE 
  key_id = '8f1bc3ae8d5974c8101c8c908633b60faf9cbfd9e1628bb1f50b5aa886271f26' 
  AND (
    token = '9KiMMGiK/jT8biQiLyZrEdY9dQhsXNWhUYMIOqItrHg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016