UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NfEHkKM8uMl/Oo/JedewYyVs2JW0vkjbKGY6FEX66xs='
WHERE
key_id = '5509a13acd875d75aa0408c874dd69de425648ff075db8bb4df37a82c34c66c3'
AND (
token = 'NfEHkKM8uMl/Oo/JedewYyVs2JW0vkjbKGY6FEX66xs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)