UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3kOx6/Lr69tFOHRflPJ0BRKAx9G/YwJ6QeRzvICLYRE='
WHERE
key_id = 'f14d0257033a675fedcfc8f6c8d4c7827d05834a7a54d69fc0c5fbbfbd850df4'
AND (
token = '3kOx6/Lr69tFOHRflPJ0BRKAx9G/YwJ6QeRzvICLYRE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)