UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cdk5G/+1gUiIrEZJJmefGU2MyratptXBgkVtBTKV87s='
WHERE
key_id = 'b2928acf271498f44056a85a772af7be18ed2bcdfafbccc63d12a0cb5f6c592f'
AND (
token = 'Cdk5G/+1gUiIrEZJJmefGU2MyratptXBgkVtBTKV87s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)