UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MYdLNU++xCVBFRg4EC0M5XHkT4c/nQn0qMwBp9vHL3c='
WHERE
key_id = '35f946e45594182e4ca50bbe83ac8c3d84edac4f16a3a00db4531f7c422f95fc'
AND (
token = 'MYdLNU++xCVBFRg4EC0M5XHkT4c/nQn0qMwBp9vHL3c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)