UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4oBo/8Ecl1UbipL2qH7aDJgFt5TL5lFutpPKNQETjDk='
WHERE
key_id = '95a204884a682212bc507a81e4d7dc83840e99f6c0edaed2d01c92285dc284cf'
AND (
token = '4oBo/8Ecl1UbipL2qH7aDJgFt5TL5lFutpPKNQETjDk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)