UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wz2yhwZPwXQoU1mVfn2sNq/KEdG8VJ0d7B9v5zBMIiw='
WHERE
key_id = '14b182f223120fad568de53adece7da170787fa4097c05f4432c13f176aed30f'
AND (
token = 'Wz2yhwZPwXQoU1mVfn2sNq/KEdG8VJ0d7B9v5zBMIiw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)