UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4L6ObUCrXQW62AwEcebNRURXIKS2WFy3cRjwIb2H/Ho='
WHERE
key_id = '8264a6d091e939ff0b258a5a5e6c9577d0a254195c02c4253d8f983f4650a6e5'
AND (
token = '4L6ObUCrXQW62AwEcebNRURXIKS2WFy3cRjwIb2H/Ho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)