UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9pSBsS9qhtFVlZAVhThbPVRFidjhsl/MTBRT7151LDY='
WHERE
key_id = 'f11b065d76ff0278623a24033876336c28a249a243db17e6eec05c77f1b98d79'
AND (
token = '9pSBsS9qhtFVlZAVhThbPVRFidjhsl/MTBRT7151LDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)