UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L10ZdUjTf73Y/aI4DalmJHXIBKHQ1qPEumMVEfnLuJg='
WHERE
key_id = '9bbef9a28e1ca2bbc75879e1c1ae3db2e8ac8edc088fdbd145d2ccd048b61c9c'
AND (
token = 'L10ZdUjTf73Y/aI4DalmJHXIBKHQ1qPEumMVEfnLuJg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)