UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ajbCEQfqUnYjLwTUbFw2dGQ5YYBSj0Lz9rbRLC0S4FY='
WHERE
key_id = '4bb32d437aea52504d089aea43b93f8fa907cb5a65ff7cc3ebe67f63a4f0649c'
AND (
token = 'ajbCEQfqUnYjLwTUbFw2dGQ5YYBSj0Lz9rbRLC0S4FY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)