UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1y1opjE4doIakSvp2YMFeLMWsjOqmJpz/PatvopY5bo='
WHERE
key_id = '5c0a59eb4465b88adc92243693490ea6c3d9dd7e9e93246fa9c06ce33edae95e'
AND (
token = '1y1opjE4doIakSvp2YMFeLMWsjOqmJpz/PatvopY5bo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)