UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zq6EptPcc2r6/DBzM2s8vW2kbM0aLK/XO8l/KyXWfdU='
WHERE
key_id = '8879193e061c00639d448c2dddeb6d43b4b895026f6651c148ba20b04596edc1'
AND (
token = 'Zq6EptPcc2r6/DBzM2s8vW2kbM0aLK/XO8l/KyXWfdU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)