UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qxjrwV18aVZ+rhEqJAeUJd2eVSKxIp2Dkbb9Ky6IoMI='
WHERE
key_id = '98b1b95a242972805d1d9e2e423546c3e7be257074fd0a278550574b71bcb046'
AND (
token = 'qxjrwV18aVZ+rhEqJAeUJd2eVSKxIp2Dkbb9Ky6IoMI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)