UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l0lWv0fWe/cqznYSVVgFu7bZ9gWDDCUrPtXffqCmkhQ='
WHERE
key_id = '763e00d6814b340472bff24a405928fc0f6ad8416cc26ee5f98b3e534cca2fd6'
AND (
token = 'l0lWv0fWe/cqznYSVVgFu7bZ9gWDDCUrPtXffqCmkhQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)