UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '734JwsPXbXInvlSMfe2ryS5pC7qhiKYeWVZoWjEPA1c='
WHERE
key_id = '9f95fb5a9f0a319004cddccb00ec7bca550a29f98bb50ca30100cfa28179aeb2'
AND (
token = '734JwsPXbXInvlSMfe2ryS5pC7qhiKYeWVZoWjEPA1c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)