UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mEmI+KxYkvcrkDaNQTd82VLXyp+FFOaONOZCckSuBII='
WHERE
key_id = '99e8abb6bc37bc06f9db512315907454a06036fe044f4825cb11f91c9797c51e'
AND (
token = 'mEmI+KxYkvcrkDaNQTd82VLXyp+FFOaONOZCckSuBII='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)