UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H4XwfQ3mpsVQihch/S6mH102mb7Drf7Q96APGHvDcqc='
WHERE
key_id = '655926ac8ddcae00b0c111232b2e7a30b92f214d4d36a5c57dc5c0d1a83e9a84'
AND (
token = 'H4XwfQ3mpsVQihch/S6mH102mb7Drf7Q96APGHvDcqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)