UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nDvn2M2AlL2mJknqnWnSSkdlBFb4C9QBk4FooAy/gIA='
WHERE
key_id = '09715d9d3841c3f78e8b0e4a9169e7f68cf3a84e01363658c0f6cc29671019a7'
AND (
token = 'nDvn2M2AlL2mJknqnWnSSkdlBFb4C9QBk4FooAy/gIA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)