UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GEV8asgJFc4tqBBfdajE/oWduImbBVAl5dTXYc4FwqY='
WHERE
key_id = 'ce5223050a3da4486908685adc5da20081f71ce04535c0c9a6cc95bc116bfe29'
AND (
token = 'GEV8asgJFc4tqBBfdajE/oWduImbBVAl5dTXYc4FwqY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)