UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'svHYwg1UJ27m+DKckOQM2q8yZwqtKcrPm/hDXykTLKo='
WHERE
key_id = '1cbf9c2be3ec45fd953c48433f4e072e016fff5eadd55c97d159e8adeff521bb'
AND (
token = 'svHYwg1UJ27m+DKckOQM2q8yZwqtKcrPm/hDXykTLKo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)