UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yFaRMpXbIMra32WNyNaHAGmhyBR+WVT2iwou0beamio='
WHERE
key_id = '9e236d6f806612fce7159c120372a7ed6fa98d4d4fc04ef611115704f7f296f3'
AND (
token = 'yFaRMpXbIMra32WNyNaHAGmhyBR+WVT2iwou0beamio='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)