UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eL3eO+LXouzHhPeAzGBAX6j/dMa6wXqIYDKcFyz4hYI='
WHERE
key_id = '45f490fada5ab97c62a43b0ac43a6d218108b86536fc2f3eb74fafcee71eac86'
AND (
token = 'eL3eO+LXouzHhPeAzGBAX6j/dMa6wXqIYDKcFyz4hYI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)