UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wOVjZj9FpCVsZM7WrrGiHU5cmy6/r8as4W2GYGe6mRQ='
WHERE
key_id = '26918d9dac2dae241fd50599bce1872289acd5b54b7dac5494be1c37bfc0b42f'
AND (
token = 'wOVjZj9FpCVsZM7WrrGiHU5cmy6/r8as4W2GYGe6mRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)