UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Jyrgilb6ZhXQ7+AqjpTFSkQgrLLtM9mou1IC5MDSak='
WHERE
key_id = 'a91726893dce59975189245725dfcdf6aee24606f9ef73bdd581bda6fd904c18'
AND (
token = '/Jyrgilb6ZhXQ7+AqjpTFSkQgrLLtM9mou1IC5MDSak='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)