UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ud0j9SXrM995BmnZaO4onyJDO2Mo9x9GK7Erz/4WwDU='
WHERE
key_id = '83b2575895cb8771b03c810c886ec96005aba48df1ad19fce475f448b01b696b'
AND (
token = 'ud0j9SXrM995BmnZaO4onyJDO2Mo9x9GK7Erz/4WwDU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)