UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ku254wpKSC4GATvmueqb//UbKE9bs8RCL81Cl5ho8HE='
WHERE
key_id = '30715ef4782eba6edd9866dafcaf039988fe2d37b680b6ed6cd15f37fa67b400'
AND (
token = 'ku254wpKSC4GATvmueqb//UbKE9bs8RCL81Cl5ho8HE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)