UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SxBMQNoVQKhHsWzv+CibwlBDe1AMDph6fd3yHnq2wo0='
WHERE
key_id = '075af330c49b7a12ed9d0fc186bba7390fb64c2f69310bd83ae952cce6079c30'
AND (
token = 'SxBMQNoVQKhHsWzv+CibwlBDe1AMDph6fd3yHnq2wo0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)